package com.songshuai.webapi.permission.service.impl;

import com.songshuai.webapi.permission.dao.YxTLogMapper;
import com.songshuai.webapi.permission.model.YxTLog;
import com.songshuai.webapi.permission.service.YxTLogService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author: lhx
 * @Date: 2018/11/26 14:17
 * @Version 1.0
 */
@Slf4j
@Service
public class YxTLogServiceImpl implements YxTLogService {

    @Autowired
    private YxTLogMapper yxTLogMapper;

    @Async
    @Override
    public void insertSelective(YxTLog yxTLog) {
        yxTLogMapper.insertSelective(yxTLog);
        log.info("单条插入日志成功");
    }

    @Async
    @Override
    public void insertBatch(List<YxTLog> list) {
        yxTLogMapper.insertBatch(list);
        log.info("批量插入日志成功");
    }


}
